package com.example.triprec.common;

import com.example.triprec.R;
import com.example.triprec.entity.Scenic;

import java.util.ArrayList;
import java.util.List;

public class ScenicData {

    public static List<Scenic> getScenicList() {
        List<Scenic> scenicList = new ArrayList<>();

// 1. 九寨沟
        Scenic scenic1 = new Scenic();
        scenic1.setId(1L);
        scenic1.setName("九寨沟");
        scenic1.setDescription("九寨沟以翠海、叠瀑、彩林、雪峰、藏情、蓝冰'六绝'著称，被誉为'童话世界'。这里的水清澈见底，随着光照和季节变化呈现不同的色彩。");
        scenic1.setImageResources(new Integer[]{R.drawable.img_jiuzhaigou1, R.drawable.img_jiuzhaigou2, R.drawable.img_jiuzhaigou3});
        scenic1.setCategories(new String[]{"自然风光", "世界遗产", "摄影胜地"});
        scenic1.setLocation("四川省阿坝藏族羌族自治州九寨沟县");
        scenic1.setOpening("4月1日-11月15日 07:00-18:00");
        scenic1.setPrice(220.0);
        scenicList.add(scenic1);

// 2. 张家界
        Scenic scenic2 = new Scenic();
        scenic2.setId(2L);
        scenic2.setName("张家界国家森林公园");
        scenic2.setDescription("以奇特的石英砂岩峰林地貌闻名，电影《阿凡达》取景地，三千奇峰拔地而起，八百溪流蜿蜒曲折。");
        scenic2.setImageResources(new Integer[]{R.drawable.img_zhangjiajie1, R.drawable.img_zhangjiajie2, R.drawable.img_zhangjiajie3});
        scenic2.setCategories(new String[]{"世界地质公园", "自然奇观", "徒步胜地"});
        scenic2.setLocation("湖南省张家界市武陵源区");
        scenic2.setOpening("全年开放 07:00-18:00");
        scenic2.setPrice(248.0);
        scenicList.add(scenic2);

// 3. 丽江古城
        Scenic scenic3 = new Scenic();
        scenic3.setId(3L);
        scenic3.setName("丽江古城");
        scenic3.setDescription("保存完好的少数民族古城，融合了纳西族文化和汉族建筑风格，小桥流水，古巷深深，夜晚的酒吧街别具风情。");
        scenic3.setImageResources(new Integer[]{R.drawable.img_lijiang1, R.drawable.img_lijiang2, R.drawable.img_lijiang3});
        scenic3.setCategories(new String[]{"文化遗产", "古城古镇", "夜生活"});
        scenic3.setLocation("云南省丽江市古城区");
        scenic3.setOpening("全天开放");
        scenic3.setPrice(80.0);
        scenicList.add(scenic3);

// 4. 黄山
        Scenic scenic4 = new Scenic();
        scenic4.setId(4L);
        scenic4.setName("黄山");
        scenic4.setDescription("'五岳归来不看山，黄山归来不看岳'，以奇松、怪石、云海、温泉'四绝'著称，日出和云海景观尤为壮观。");
        scenic4.setImageResources(new Integer[]{R.drawable.img_huangshan1, R.drawable.img_huangshan2, R.drawable.img_huangshan3});
        scenic4.setCategories(new String[]{"世界遗产", "名山", "摄影胜地"});
        scenic4.setLocation("安徽省黄山市黄山区");
        scenic4.setOpening("06:30-17:00");
        scenic4.setPrice(190.0);
        scenicList.add(scenic4);

// 5. 桂林漓江
        Scenic scenic5 = new Scenic();
        scenic5.setId(5L);
        scenic5.setName("桂林漓江");
        scenic5.setDescription("'桂林山水甲天下'，漓江两岸奇峰倒影，碧水萦回，乘竹筏漂流是体验'舟行碧波上，人在画中游'的最佳方式。");
        scenic5.setImageResources(new Integer[]{R.drawable.img_guilin1, R.drawable.img_guilin2, R.drawable.img_guilin3});
        scenic5.setCategories(new String[]{"自然风光", "河流", "摄影胜地"});
        scenic5.setLocation("广西壮族自治区桂林市");
        scenic5.setOpening("全天开放(游船08:00-17:00)");
        scenic5.setPrice(210.0);
        scenicList.add(scenic5);

// 6. 长城（八达岭）
        Scenic scenic6 = new Scenic();
        scenic6.setId(6L);
        scenic6.setName("八达岭长城");
        scenic6.setDescription("世界新七大奇迹之一，'不到长城非好汉'，八达岭是保存最完好、最具代表性的长城段落，气势恢宏。");
        scenic6.setImageResources(new Integer[]{R.drawable.img_greatwall1, R.drawable.img_greatwall2, R.drawable.img_greatwall3});
        scenic6.setCategories(new String[]{"世界遗产", "历史遗迹", "地标建筑"});
        scenic6.setLocation("北京市延庆区");
        scenic6.setOpening("06:30-19:00(夏季)");
        scenic6.setPrice(40.0);
        scenicList.add(scenic6);

// 7. 西湖
        Scenic scenic7 = new Scenic();
        scenic7.setId(7L);
        scenic7.setName("杭州西湖");
        scenic7.setDescription("'欲把西湖比西子，淡妆浓抹总相宜'，中国首个免费开放的5A级景区，十景各具特色，四季风光不同。");
        scenic7.setImageResources(new Integer[]{R.drawable.img_westlake1, R.drawable.img_westlake2, R.drawable.img_westlake3});
        scenic7.setCategories(new String[]{"湖泊", "城市公园", "文化遗产"});
        scenic7.setLocation("浙江省杭州市西湖区");
        scenic7.setOpening("全天开放");
        scenic7.setPrice(0.0); // 免费
        scenicList.add(scenic7);

// 8. 鼓浪屿
        Scenic scenic8 = new Scenic();
        scenic8.setId(8L);
        scenic8.setName("鼓浪屿");
        scenic8.setDescription("'海上花园'，万国建筑博览，钢琴之岛。岛上无机动车，充满文艺气息，适合漫步感受中西文化交融。");
        scenic8.setImageResources(new Integer[]{R.drawable.img_gulangyu1, R.drawable.img_gulangyu2, R.drawable.img_gulangyu3});
        scenic8.setCategories(new String[]{"海岛", "文化遗产", "文艺小镇"});
        scenic8.setLocation("福建省厦门市思明区");
        scenic8.setOpening("全天开放(部分景点08:00-17:30)");
        scenic8.setPrice(90.0); // 联票价格
        scenicList.add(scenic8);

// 9. 稻城亚丁
        Scenic scenic9 = new Scenic();
        scenic9.setId(9L);
        scenic9.setName("稻城亚丁");
        scenic9.setDescription("'最后的香格里拉'，雪山、冰川、湖泊、草原的完美结合，三神山(仙乃日、央迈勇、夏诺多吉)巍峨壮丽。");
        scenic9.setImageResources(new Integer[]{R.drawable.img_daocheng1, R.drawable.img_daocheng2, R.drawable.img_daocheng3});
        scenic9.setCategories(new String[]{"高原", "雪山", "徒步胜地"});
        scenic9.setLocation("四川省甘孜藏族自治州稻城县");
        scenic9.setOpening("4月1日-11月30日 07:00-18:30");
        scenic9.setPrice(146.0);
        scenicList.add(scenic9);

// 10. 莫高窟
        Scenic scenic10 = new Scenic();
        scenic10.setId(10L);
        scenic10.setName("莫高窟");
        scenic10.setDescription("'东方卢浮宫'，世界文化遗产，现存735个洞窟、4.5万平方米壁画和2415尊泥质彩塑，展现千年佛教艺术。");
        scenic10.setImageResources(new Integer[]{R.drawable.img_mogao1, R.drawable.img_mogao2, R.drawable.img_mogao3});
        scenic10.setCategories(new String[]{"世界遗产", "石窟艺术", "历史遗迹"});
        scenic10.setLocation("甘肃省敦煌市");
        scenic10.setOpening("08:00-18:00(旺季需预约)");
        scenic10.setPrice(238.0); // A类票价格
        scenicList.add(scenic10);

        return scenicList;
    }

    public static Scenic getScenicById(long id) {
        for (Scenic scenic : getScenicList()) {
            if (scenic.getId() == id) {
                return scenic;
            }
        }
        return null;
    }

    public static List<Scenic> getScenicListByName(String name) {
        List<Scenic> filteredList = new ArrayList<>();
        for (Scenic scenic : getScenicList()) {
            if (scenic.getName().toLowerCase().contains(name.toLowerCase())) {
                filteredList.add(scenic);
            }
        }
        return filteredList;
    }
}
